<template>
  <div>
    <ul>
      <li v-for="(item) in arr" :key="item.id">{{ item }}</li>
    </ul>
    <hr />

    <div>{{$route.params.id}}123</div>
  </div>


</template>

<script lang="ts">
import { defineComponent } from "vue";
// interface Txt {
//   title: string;
//   contend: string;
// }

// <div v-for="(el, s) in sub" :key="s">
//   ddsasd
//   <div>{{ el.title }}</div>
//   <div>{{ el.contend }}</div>
// </div>

export default defineComponent({
  setup() {
    // const sub1: Array<Txt> = reactive([]);
    const arr = ["new1", "new2", "new3"]
    const sub = [
      {
        id: 1,
        title: "oo1",
        contend: "hah1",
      },

      {
        id: 2,
        title: "oo2",
        contend: "hah2",
      },

      {
        id: 3,
        title: "oo1",
        contend: "hah3",
      },
    ];
    return {
      arr,
      sub,
      // sub1,
    };
  },

  // mounted() {
  //   this.sub1 = [
  //     {
  //       title: "dxk",
  //       contend: "haha",
  //     },
  //   ];
  //   console.log(this);
  // },
});
</script>

<style scoped>
</style>